package com.ncst.backend.service.impl;

import com.ncst.backend.domain.DisposalRequest;
import com.ncst.backend.mapper.DisposalRequestMapper;
import com.ncst.backend.service.DisposalRequestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DisposalRequestServiceImpl implements DisposalRequestService {
    @Autowired
    private DisposalRequestMapper disposalRequestMapper;

    @Override
    public List<DisposalRequest> getAll() {
        return disposalRequestMapper.getAll();
    }

    @Override
    public List<DisposalRequest> getByCondition(DisposalRequest disposalRequest) {
        return disposalRequestMapper.getByCondition(disposalRequest);
    }

    @Override
    public boolean save(DisposalRequest disposalRequest) {
        return disposalRequestMapper.save(disposalRequest) > 0;
    }

    @Override
    public boolean updateById(DisposalRequest disposalRequest) {
        return disposalRequestMapper.updateById(disposalRequest) > 0;
    }

    @Override
    public boolean removeById(Integer id) {
        return disposalRequestMapper.removeById(id) > 0;
    }

    @Override
    public boolean removeByIds(List<Integer> ids) {
        return disposalRequestMapper.removeByIds(ids) > 0;
    }

    @Override
    public List<DisposalRequest> getByRegisterId(Integer registerId) {
        return disposalRequestMapper.getByRegisterId(registerId);
    }
}
